package lab3p1;

import javax.swing.JFrame;
import javax.swing.JButton;

/**
 * Title: Lab3BasicWindow class for CSIS 235 Lab 3
 * Description: CS 235 Lab #3
 *    Basic GUI class that uses a JButton object.
 * 
 * @author Anthony Varghese
 * @email anthony.varghese@my.uwrf.edu
 * @date September 3rd 2014
 * @version 1.0
 */
public class Lab3BasicWindow extends JFrame {

	/**
	 * main - this is where the program starts
	 * @param args
	 */
	public static void main(String[] args) {
		Lab3BasicWindow window = new Lab3BasicWindow("My window with a button");
		
	}

	/**
	 * Class data members:
	 * Default serial version id
	 */
	private static final long serialVersionUID = 1L;

	/**
	 * Instance data members
	 */
	private JButton button1;
	
	/**
	 * Constructor
	 * @param title
	 */
	public Lab3BasicWindow(String title) {
		super(title);
		
		setBounds( 200, 100, 400, 300 );
		setLayout( null );
		
		button1 = new JButton( "Click me!" );
		button1.setBounds( 50, 100, 100, 30 );
		add( button1 );
		
		setDefaultCloseOperation( EXIT_ON_CLOSE );
		setVisible( true );
	}

	
}
